import { getStorage } from './utils';

import { history } from 'umi';

import 'antd/dist/antd.css';


export function render(oldRender: Function) {
  const userName = getStorage('userName')
  if (userName) {
    console.log(userName);
    oldRender()
  } else {
    history.push('/login');
    oldRender()
  };
}